package Q4;
/*
创建学生对象用来记录单个学生信息
* */
public class student {
//    1.自定义成员变量和构造方法
    String studentID;
    String studentName;
    int studentAge;

    public student(String studentID, String studentName, int studentAge) {
        this.studentID = studentID;
        this.studentName = studentName;
        this.studentAge = studentAge;
    }

    public String getStudentID() {
        return studentID;
    }

    public void setStudentID(String studentID) {
        this.studentID = studentID;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public int getStudentAge() {
        return studentAge;
    }

    public void setStudentAge(int studentAge) {
        this.studentAge = studentAge;
    }

    @Override
    public String toString() {
        return "学号： " + studentID +
                ",姓名： '" + studentName + '\'' +
                ", 年龄： " + studentAge +'\n';
    }
}
